import Vue from 'vue';
import Router from 'vue-router';
import home from '@/page/home';
import msglist from '@/page/message';
import msgDetail from '@/page/msgDetai';
import center from '@/page/center';
import invitedShare from '@/page/center/invitedShare';
import password from '@/page/center/password';
import personal from '@/page/center/personal';
import task from '@/page/center/task';
import expenditure from '@/page/center/expenditure';
import survey from '@/page/survey';
Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: home
    },
    {
      path: '/msglist',
      name: 'msglist',
      component: msglist
    },
    {
      path: '/survey',
      name: 'survey',
      component: survey
    },
    {
      path: '/message/:id',
      name: 'msgDetail',
      component: msgDetail
    },
    {
      path: '/center',
      component: center,
      children: [
        {
          path: '/',
          component: task
        },
        {
          path: 'invitedShare',
          name: 'invitedShare',
          component: invitedShare
        },
        {
          path: 'password',
          name: 'password',
          component: password
        },
        {
          path: 'personal',
          name: 'personal',
          component: personal
        },
        {
          path: 'task',
          name: 'task',
          component: task
        },
        {
          path: 'expenditure',
          name: 'expenditure',
          component: expenditure
        }]
    }
  ]
});
